package y25.m2;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class RandomArrayString {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        addNum(list);
        System.out.print(list);
        while (true) {
//            String[] arr = getRandomArrayString();
//            for (String s : arr) {
//                System.out.print(s + " ");
//            }
        }
    }

    private static void addNum(List<Integer> list) {
        for (int i = 0; i < 10000; i++) {
            Random random = new Random();
            int h = random.nextInt(2) * 60;
            int m = (random.nextInt(65 - h) + h) * 60;
            int s = random.nextInt(3900 - m) + m;
            list.add(random.nextInt(s));
        }
    }

    private static String[] getRandomArrayString() {
        String[] arr = GetData.DOOR_CODE;
        //打乱上述字符串
        Random random = new Random();
        for (int i = 0; i < arr.length; i++) {
            int index = random.nextInt(arr.length);
            String temp = arr[i];
            arr[i] = arr[index];
            arr[index] = temp;
        }
        return arr;
    }
}
